// stk_lidar.h

#ifndef DODO_STK_LIDAR_H
#define DODO_STK_LIDAR_H



#include <quigon.h>
#include "string"
#include "vector"

namespace quigon
{

typedef BasicLidarLine<double, double> STK_Line;

#ifdef _MSC_VER
#pragma pack( push, 1 )
#endif
struct STK_Raw
{
	enum
	{
		ENERGYINDEX = 0,
		TEMPDETECTORINDEX = 1,
		TEMPBOXINDEX = 2,
		TEMPLASERINDEX = 3,
		DEADTIMECORRECTEDINDEX = 4,
		BACKGROUNDINDEX = 5,
		CLOUDBASEHEIGHTINDEX1 = 6
	};

	int head_size;
	int software_version;
	int hareware_version;
	int data_id;
	union
	{
		int date[3];
		struct
		{
			int year, month, day;
		};
	};
	union
	{
		int time[4];
		struct
		{
			int hours, minutes, seconds, millisecond;
		};
	};  // - at the end of profile

	int channel_number;
	int dummy;    //..... you should know what dummy is.

	double bin_time; // sec
	double laser_freq; // Hz
	int total_shots;  //4 bytes!!
	int analog_number; // energy monitor, temp. of detector, temp. of box, temp. of laser
}
#ifdef __GNUC__
__attribute__((packed))
#endif
;
#ifdef _MSC_VER
#pragma pack( pop )
#endif

const std::string stk_aver_attr_array[] =
{
	"energy",
	"cbh",
	"background",
	"temp_detector",
	"temp_box",
	"temp_laser"
};

const std::vector<std::string> stk_aver_attr(
        stk_aver_attr_array,
        stk_aver_attr_array + sizeof(stk_aver_attr_array) / sizeof(std::string)
);


}

#endif

